﻿<local:DocumentBase x:Class="WPFExcelReport.AB55"    
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                    Loaded="Window_Loaded"
                    Title="AB55"  
                    >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100*"></ColumnDefinition>
            <ColumnDefinition Width="100*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">
            <Button FontSize="18" Content="获取数据" Height="40" Margin="10,10,0,0"  Name="btnGetData" Width="90" Click="btnGetData_Click"/>
            <Button FontSize="18" Content="查询" Height="40" Margin="10,10,0,0"  Name="btnQuery" Width="90" Click="btnQuery_Click"/>
            <Button  FontSize="18" Content="生成询货期单" Height="40" Margin="30,10,0,0"  Name="btnPrint" Width="90" Click="btnPrint_Click"/>
            <TextBlock FontSize="18"  Height="40"   Width="80" Name="txt1" Margin="10,10,0,0" Text="加工流程" />
            <TextBlock FontSize="18"  Height="40"   Width="47" Name="txtABPAUFKRS" Margin="5,10,0,0" Text="" />
            <TextBlock  FontSize="18" Height="40"    Width="89" Name="txtABPAUFLFD"   Margin="5,10,0,0" Text="" />
        </StackPanel>
        <fd:FilteringDataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=ABPOS}" x:Name="ABPOSDataGrid" 
                               SelectionChanged="MainDataGrid_SelectionChanged" Grid.ColumnSpan="2" Margin="0,98,0,0" Grid.RowSpan="4">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=WFACTORY}" Header="织造外加工厂" Width="SizeToHeader"  MinWidth="80" />
                <DataGridTextColumn Binding="{Binding Path=STAFF}" Header="联系人" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ABPANRKR}" Header="加工" Width="SizeToCells" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=ABPALFDNR}" Header="流程" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=WORDERNO}" Header="织造订单" Width="SizeToCells" MinWidth="60" />
                <DataGridTextColumn Binding="{Binding Path=ARTICLE}" Header="织造品种" Width="SizeToCells" MinWidth="80" />
                <DataGridTextColumn Binding="{Binding Path=SORDERNO}" Header="浆纱单" Width="SizeToCells" MinWidth="60" />
                <DataGridTextColumn Binding="{Binding Path=SFACTORY}" Header="浆纱厂" Width="SizeToHeader" MinWidth="80" />
                <DataGridTextColumn Binding="{Binding Path=SMTR}" Header="总经长" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=SPCNUM}" Header="轴数" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=SQTY}" Header="单个轴长" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ABPENDDAT}" Header="计划回轴日期" Width="SizeToCells" MinWidth="60" />
                <DataGridTextColumn Binding="{Binding Path=RATE}" Header="工艺织缩" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=PRICE}" Header="单价" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=FDISM}" Header="机上纬密" Width="SizeToCells" MinWidth="40" />

            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
    </Grid>
</local:DocumentBase>
